import React from 'react'
import Jspang from '../components/Jspang'
import Link from 'next/link'
import Router from 'next/router'

const Home = () => (
  <div>
      <Jspang>哈哈</Jspang><br/><br/>
      <div>
        标签跳转<br/>
        <Link href="/page1">page1</Link> <br/><br/>
        <Link href="/page2">page2</Link> <br/><br/>


        编程式跳转<br/>
        <button onClick={() => {Router.push('/page1')}}>去 page1 页面</button> <br/><br/>
        <button onClick={() => {Router.push('/page2')}}>去 page2 页面</button> <br/><br/>

        {/* <button onClick={goPage2}>去 page2 页面</button> <br/><br/> */}

      </div>
   </div>
)

export default Home
